package Class018;

import BasicDataStructures.TreeNode;
import Utils.TreeUtils;
import sun.reflect.generics.tree.Tree;

import java.util.Stack;

public class BinaryTree {
    public static void main(String[] args) {
//        String data = "123456#78##10";
//        String data = "12347#8#5####9###6#########0";
        String data = "1234567";
        TreeNode root = TreeUtils.generateTree(data);
        TreeUtils.printTree(root, "pre", true);
        TreeUtils.printTree(root, "pre", false);

        TreeUtils.printTree(root, "in", true);
        TreeUtils.printTree(root, "in", false);

        TreeUtils.printTree(root, "post", true);
        TreeUtils.printTree(root, "post", false);

        TreeUtils.printTree(root, "fuck", true);
    }


}
